package com.chj.service;

import java.util.List;

import com.chj.entity.User;


public interface UserService {
	
	public boolean login(String userId
			           , String userPassword);


	/**
	 * checkUserExist
	 * @param user
	 * @return 
	 */
	public boolean checkUserExist(User user);

	/**
	 * addUser
	 * @param user
	 * @return success true/false
	 */
	public boolean addUser(User user);

	/**
	 * getUser
	 * @param userId
	 * @param password
	 * @return user
	 */
	public User getUser(String userId, String password);

	public User getAdmin(String userId, String password);

	//通过条件查询后台
    public List<User> getUserListBy(String userName
                                   ,String userPhone
                                   ,String userEmail
                                   ,String dateBegin
                                   ,String dateEnd
                                   ,int userType
                                   ,int page
                                   ,int rows);

    //通过条件查询后台的数量
    public int getUserListSizeBy(String userName
                                ,String userPhone
                                ,String userEmail
                                ,String dateBegin
                                ,String dateEnd
                                ,int    userType);

    //修改密码的service
    public int changeAdminPassword(User admin);

    //修改用户密码
    public int changeUserPassword(User user);

    //修改用户信息
    public int changeUserData(User user);

    //重置用户密码
    public int resetUserPassword(String userId);

}
